home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / pm65sdk / sourcecode / pagemakerclasslibrary / queries / plistmom.h < prev    next >
C/C++ Source or Header  |  1996-07-11  |  1KB  |  52 lines

  1. /*
  2.  *--- PListMom.h ----------------------------------------------------------
  3.  * Copyright (c) 1995-96 Adobe Systems Incorporated.  All rights reserved.
  4.  * Created on Thu, Oct 12, 1995 @ 10:06 PM by Paul Ferguson.
  5.  *
  6.  * Description:  This is the utility class for query classes
  7.  * that contain a list of information.  Refer to PListQuery
  8.  * to see how it is used.
  9.  *
  10.  * Policies:
  11.  *  (1) It makes no assumptions about the size of the list
  12.  *      blocks, or that they are fixed or variable length.
  13.  *  (2) If at the end of the list, it wraps around to the
  14.  *      beginning.
  15.  *  (3) PListMom objects do not care if the list is empty
  16.  *      (zero members).
  17.  *-------------------------------------------------------------------------
  18.  */
  19. #ifndef __PListMom__
  20. #define __PListMom__
  21.  
  22. #ifdef __MWERKS__
  23. #pragma once
  24. #endif
  25.  
  26. class PListMom
  27. {
  28.  
  29. public:
  30.  
  31.     PListMom();
  32.  
  33.     PListMom& operator=(const char * buf);        // initialize the list mom
  34.     
  35.     const char * Current() const { return curItemPtr; }
  36.     short Count() const { return numItems; }
  37.     void Reset();
  38.     void Update(const char * ch);
  39.  
  40. private:
  41.  
  42.     short numItems;
  43.     const char * itemsPtr;
  44.  
  45.     short curItem;
  46.     const char * curItemPtr;
  47. };
  48.  
  49. #endif
  50.  
  51. // end of PListMom.h
  52.